package com.ykdl.member.kid.beans;

import java.io.Serializable;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import net.wxxr.http.interfaces.IJsonParser;
/**
 * 门店在线可用优惠券
 * @author jiafeiyu
 *
 */
public class OnLineCouponBean implements Serializable   ,IJsonParser{

	/**
	 * 我的在线优惠券
	 *  "status": 2,
      "used": false,
      "valid_end_time": 1440312313,
      "coupon_id": 3,
      "members_only": false,
      "created_time": 1437720313,
      "logo": {
        "url": "http://imgs.ykdllmyr.com/fxs/2015/7/20/CDbaKw8Yq8XMtmhCdVnQ3J.jpeg",
        "width": 1170,
        "file_id": 100101872,
        "height": 500
      },
      "coupon_type": 4,
      "valid_note": "valid_note",
      "scope_desc": "适用范围描述中文",
      "note": "note",
      "ticket_id": "0000006D55B1F404",
      "coupon_num_2": null,
      "coupon_num_1": 30,
      "valid_begin_time": 1437633913
    }
	 * 在线优惠券返回数据
	 *---------------- 
	 *"status": 2,
      "valid_end_time": 1440312313,
      "coupon_id": 3,
      "members_only": false,
      "created_time": 1437720313,
      "logo": {
        "url": "http://imgs.ykdllmyr.com/fxs/2015/7/20/CDbaKw8Yq8XMtmhCdVnQ3J.jpeg",
        "width": 1170,
        "file_id": 100101872,
        "height": 500
      },
      "coupon_type": 4,
      "valid_note": "valid_note",
      "scope_desc": "适用范围描述中文",
      "note": "note",
      "coupon_num_2": null,
      "coupon_num_1": 30,
      "valid_begin_time": 1437633913
    } 
	 */
	private static final long serialVersionUID = 2559557249075095147L;
	private int status;
	private boolean used;
	private String valid_end_time;
	private int coupon_id;
	private boolean members_only;
	private String created_time;
	private FileBean logo;
	private int coupon_type;
	private String valid_note;
	private String scope_desc;
	private String note;
	private String coupon_num_2;
	private String coupon_num_1;
	private String valid_begin_time;
	private boolean receive_flag;
	private String ticket_id;
	
	public String getTicket_id() {
		return ticket_id;
	}
	public void setTicket_id(String ticket_id) {
		this.ticket_id = ticket_id;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public String getValid_end_time() {
		return valid_end_time;
	}
	public void setValid_end_time(String valid_end_time) {
		this.valid_end_time = valid_end_time;
	}
	public int getCoupon_id() {
		return coupon_id;
	}
	public void setCoupon_id(int coupon_id) {
		this.coupon_id = coupon_id;
	}
	public boolean isMembers_only() {
		return members_only;
	}
	public void setMembers_only(boolean members_only) {
		this.members_only = members_only;
	}
	public String getCreated_time() {
		return created_time;
	}
	public void setCreated_time(String created_time) {
		this.created_time = created_time;
	}
	public FileBean getLogo() {
		return logo;
	}
	public void setLogo(FileBean logo) {
		this.logo = logo;
	}
	public int getCoupon_type() {
		return coupon_type;
	}
	public void setCoupon_type(int coupon_type) {
		this.coupon_type = coupon_type;
	}
	public String getValid_note() {
		return valid_note;
	}
	public void setValid_note(String valid_note) {
		this.valid_note = valid_note;
	}
	public String getScope_desc() {
		return scope_desc;
	}
	public void setScope_desc(String scope_desc) {
		this.scope_desc = scope_desc;
	}
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	public String getCoupon_num_2() {
		return coupon_num_2;
	}
	public void setCoupon_num_2(String coupon_num_2) {
		this.coupon_num_2 = coupon_num_2;
	}
	public String getCoupon_num_1() {
		return coupon_num_1;
	}
	public void setCoupon_num_1(String coupon_num_1) {
		this.coupon_num_1 = coupon_num_1;
	}
	public String getValid_begin_time() {
		return valid_begin_time;
	}
	public void setValid_begin_time(String valid_begin_time) {
		this.valid_begin_time = valid_begin_time;
	}
	public boolean isReceive_flag() {
		return receive_flag;
	}
	public void setReceive_flag(boolean receive_flag) {
		this.receive_flag = receive_flag;
	}
	@Override
	public IJsonParser parse(String json) throws Exception {
		// TODO Auto-generated method stub
		Gson   gson = null;
		if(null != json){
			GsonBuilder b = new GsonBuilder();
			gson  = b.create();
			return gson.fromJson(json, OnLineCouponBean.class);
		}
		return null;
	}
	public boolean isUsed() {
		return used;
	}
	public void setUsed(boolean used) {
		this.used = used;
	}
	
	
}
